package cn.team11.util;

import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;


public class T11Util {

    /**
     * 获取安卓的版本信息
     * @param ctx
     * @return
     */
    public static PackageInfo getPkgInfo(Context ctx) {
        PackageManager manager = ctx.getPackageManager();
        PackageInfo info = null;
        try {
            info = manager.getPackageInfo(ctx.getPackageName(), 0);
        } catch (PackageManager.NameNotFoundException e) {
            T11Log.e(e);
        }
        return info;
    }
}
